home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
By Popular Request 2.0
/
By Popular Request 2.0 (Arsenal Computer).ISO
/
amiga_1
/
amsls495.lzh
/
AMOSLIST
/
000023_amos-request@svcs1.digex.net_Wed Apr 5 20:38:53 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1995-05-01
|
3KB
Received: from svcs1.digex.net by nfs2.digex.net with SMTP id AA11023
(5.67b8/IDA-1.5); Wed, 5 Apr 1995 20:38:49 -0400
Received: by svcs1.digex.net id AA01778
(5.67b8/IDA-1.5 for amos-out); Wed, 5 Apr 1995 16:46:53 -0400
Received: from nfs1.digex.net by svcs1.digex.net with SMTP id AA01772
(5.67b8/IDA-1.5 for <amos@svcs1.digex.net>); Wed, 5 Apr 1995 16:46:51 -0400
Received: from vortex.netbistro.com by nfs1.digex.net with SMTP id AA11701
(5.67b8/IDA-1.5 for <amos-list@access.digex.net>); Wed, 5 Apr 1995 16:46:45 -0400
Received: by vortex.netbistro.com (Smail3.1.29.1 #11)
id m0rwbyK-000LTGC; Wed, 5 Apr 95 13:46 WET DST
Date: Wed, 5 Apr 1995 13:46:21 -0700 (PDT)
From: Gau <gau@vortex.netbistro.com>
To: CRSO.Amos@canrem.com
Cc: amos-list@access.digex.net
Subject: Re: stdin/stdout
In-Reply-To: <60.2092.6587.0C1D9EA3@canrem.com>
Message-Id: <Pine.BSD.3.91.950405133029.28440A-100000@vortex.netbistro.com>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: O
X-Status:
On Wed, 5 Apr 1995, Mike Pelletier wrote:
> Well, yes there are. And you can't write online games unless you use
> stdin/stdout. Every language on the planet but amos can be easily ported to
> bbs games because they use the stdin/stdout routinnes for input/output
Okay, two ways:
1: Open In 1,"*"
Open Out 2,"*":rem *** To/From CLI ***
You'd then use something like Input$(1) to get CLI input and
Print#2,BLAH$ to place output to the CLI. I've had problems with
this method since I've had difficulties with bi-direction CLI
communication. Maybe someone can get this method to work.
2: <This method is a little trickier but not too difficult>
A$="*"
Areg(1)=Varptr(A$)
MYIO=Doscall(LVO("Open"))
Then you use the contents of MYIO and use the following fragments
to do IO:
IN:
inbuf$=space$(30)
areg(1)=MYIO
areg(2)=Varptr(inbuf$)
dreg(0)=1
z=Doscall(LVO("Read"))
OUT:
outbuf$="Hello world"
areg(1)=MYIO
areg(2)=Varptr(outbuf$)
z=Doscall(LVO("Write"))
Finally, when you are done, you have to close the file:
areg(1)=MYIO
z=Doscall(LVO"Close")
This might have left out an important detail but most of it is there. I
apologize now for any missing info since this mail caught me away from
my Amiga System Programmers' Handbook. I think Dreg(0) must be set to
an access mode for the file in the Open command. Oh, yeah it does too.
I don't know the numbers by heart either... drat. If you have the RKM
look up "Interactive". That's the mode you want.
This: Dreg(0)=Label("IsInteractive") will probably do it.
========================================================================
Gau of the Veldt
"Draped in monster hides, eyes shining with intelligence.
A youth surviving against all odds..."
=====Internet: gau@vortex.netbistro.com=================================